package com.itheima.entry;

import com.itheima.domain.Student;

import java.util.HashSet;

public class TestHashSet {
    public static void main(String[] args) {
        HashSet<Student> hashSet=new HashSet<Student>();
        Student student=new Student("1","1");
        Student student1=new Student("2","1");
        Student student2=new Student("13","1");
        Student student3=new Student("1","1");
        hashSet.add(student);
        hashSet.add(student1);
        hashSet.add(student2);
        hashSet.add(student3);
        for (Student s :hashSet){
            String name = s.getName();
            System.out.println(name);
        }

    }
}
